package com.san.warnings.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.san.common.utils.Query;
import com.san.warnings.dao.WarningsDao;
import com.san.warnings.dao.WarningsManager;
import com.san.warnings.domain.WarningsBusiDO;
import com.san.warnings.domain.WarningsCompanyDO;
import com.san.warnings.domain.WarningsFollowDO;
import com.san.warnings.domain.WarningsModelDO;
import com.san.warnings.service.WarningsService;

@Service
public class WarningsServiceImpl implements WarningsService {

	@Autowired
	WarningsDao warningMapper;
	
	@Autowired
	WarningsManager warningsManager;

	@Override
	public List<WarningsModelDO> list(Query query) {
		return warningMapper.list(query);
	}

	@Override
	public int count(Query query) {
		return warningMapper.count(query);
	}

	@Override
	public int save(WarningsModelDO warningsModelDO) {
		return warningMapper.save(warningsModelDO);
	}

	@Override
	public int changeStatus(WarningsModelDO warningsModelDO) {
		return warningMapper.changeStatus(warningsModelDO);
	}

	@Override
	public WarningsModelDO getById(Long warnId) {
		return warningMapper.getById(warnId);
	}

	@Override
	public int batchBusiRemove(Long modelId) {
		return warningMapper.batchBusiRemove(modelId);
	}

	@Override
	public int batchBusiAdd(List<WarningsBusiDO> warningsBusiDOList) {
		return warningMapper.batchBusiAdd(warningsBusiDOList);
	}

	@Override
	public List<WarningsBusiDO> listBusi(Query query) {
		return warningMapper.listBusi(query);
	}

	@Override
	public int countBusi(Query query) {
		return warningMapper.countBusi(query);
	}

	@Override
	public List<WarningsModelDO> listFollow(Query query) {
		return warningMapper.listFollow(query);
	}

	@Override
	public int countFollow(Query query) {
		return warningMapper.countFollow(query);
	}

	@Override
	public int followAdd(WarningsFollowDO warningsFollowDO) {
		return warningMapper.followAdd(warningsFollowDO);
	}

	@Override
	public int followRemove(WarningsFollowDO warningsFollowDO) {
		return warningMapper.followRemove(warningsFollowDO);
	}

	@Override
	public boolean batchRemoveData(Long warnId, Long deptId) {
		return warningsManager.batchRemoveData(warnId,deptId);
	}

	@Override
	public List<WarningsFollowDO> listFollowReview(Query query) {
		return warningMapper.listFollowReview(query);
	}

	@Override
	public int countFollowReview(Query query) {
		return warningMapper.countFollowReview(query);
	}

	@Override
	public int reviewFollowStatus(WarningsFollowDO warningsFollowDO) {
		return warningMapper.reviewFollowStatus(warningsFollowDO);
	}

	@Override
	public Long myFollowCount(Long warnId, Long deptId) {
		return warningsManager.CountMyFollowDetail(warnId,deptId);
	}
	
	@Override
	public Map<String,Object> batchAddData(Long warnId, Long deptId, List<List<String>> datas) {
		return warningsManager.batchAddData(warnId,deptId,datas);
	}

	@Override
	public List<WarningsCompanyDO> listMyFollowDetail(Query query) {
		return warningsManager.listMyFollowDetail(query);
	}

	@Override
	public int CountMyFollowDetail(Query query) {
		return warningsManager.CountMyFollowDetail(query);
	}

	@Override
	public List<WarningsModelDO> listAllFollow() {
		return warningMapper.listAllFollow();
	}

}
